home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / dsp / dr.bub / 96000.lha / 96000 / appb / b110.asm < prev    next >
Assembly Source File  |  1992-04-28  |  3KB  |  49 lines

  1. ; This program was originally published in the Motorola DSP96002 Users Manual
  2. ; and is provided under a DISCLAIMER OF WARRANTY available from Motorola DSP
  3. ; Operation, 6501 William Cannon Drive West, Austin, Texas 78735-8598.  For
  4. ; more information, refer to the DSP96002 Users Manual, Appendix B, DSP
  5. ; Benchmarks.
  6. ;
  7. ; B.1.10    N Complex Updates  
  8. ;   dr(I)+jdi(I) = {cr(I)+jci(I)}+{ar(I)+jai(I)}*{br(I)+jbi(I)}, I=1,...,N 
  9. ;   dr(I) = cr(I) + ar(I) * br(I) - ai(I) * bi(I) 
  10. ;   di(I) = ci(I) + ar(I) * bi(I) + ai(I) * br(I) 
  11. ;       D5 = ar    D4 = ai    D6 = br    D7 = bi 
  12. ;       X Memory Organization            Y Memory Organization 
  13. ;                  .                                        .      
  14. ;                 ci2                                      di2     
  15. ;                 cr2                                      dr2     
  16. ;                 ci1                                      di1     
  17. ;        R1 ?     cr1     CADDR    R5 ?     dr1         DADDR 
  18. ;                  .                                        .      
  19. ;                  .                                        .      
  20. ;                 ai2                                      bi2     
  21. ;                 ar2                                      br2     
  22. ;        R0 ?    ai1                                      bi1     
  23. ;                 ar1         AADDR    R4 ?    br1     BADDR 
  24. ;                                                                         Program    ICycles
  25. ;                                                           Words 
  26.      move   #aaddr+1,r0                                       ;    1          1 
  27.      move   #3,n0                                             ;    1          1 
  28.      move   #baddr,r4                                         ;    1          1 
  29.      move   #caddr,r1                                         ;    1          1 
  30.      move   #daddr-1,r5                                       ;    1          1 
  31.      move                        x:(r0)-,d4.s   y:(r4)+,d6.s  ;    1          1 
  32.      fclr   d2                   x:(r0)+n0,d5.s y:(r5),d0.s   ;    1          1 
  33.      do #n,end                                                ; 2          3 
  34.      fmpy d5,d6,d2 fadd.s d2,d0  x:(r1)+,d1.s   y:(r4)+,d7.s  ;    1          1 
  35.      fmpy d4,d7,d2 fadd.s d2,d1  x:(r1)+,d0.s   d0.s,y:(r5)+  ;    1          1 
  36.      fmpy d4,d6,d2 fsub.s d2,d1  x:(r0)-,d4.s   y:(r4)+,d6.s  ;    1          1 
  37.      fmpy d5,d7,d2 fadd.s d2,d0  x:(r0)+n0,d5.s d1.s,y:(r5)+  ;    1          1 
  38. end
  39.                    fadd.s d2,d0                               ;    1         1 
  40.      move                                       d0.s,y:(r5)+  ;    1          1 
  41. ;                                                            -------------------
  42. ;                                                        Totals: 15        4N+12
  43. ;                                                                (13        4N+10)
  44.  
  45.